<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

<script>


    var s = new Set()
    s.add(1).add(2).add(3).add(4).add(5).add(6).add(7).add(8).add(9).add(10)
    // console.log(s.size)

    var arr = [1, 2, 3]
    s.add(arr).add([1, 2, 3]).add(arr).add(arr).add([1, 2, 3])
    // console.log(s)
    // console.log(s.delete(1))



    // s.forEach(function (val, key) {
    //     console.log(val, key)
    // })




    var a = [4, 5, 6]
    var list = [1, 2, 3, 1, 2, 3, 1, 2, 3, a, a, a]
    // console.log(list)

    var s = new Set(list)
    //    console.log(s)



    var list = Array.from(s)
    // console.log(list)


    // 数组去重
    var list = [1, 2, 3, 1, 2, 3, 1, 2, 3, [4, 5, 6]]
    var arr = [...new Set(list)]
    console.log(arr)

</script>

</html>